package models;

public class AgendaQueue {
	private AgendaQLink first;
	private AgendaQLink last;
	
	public AgendaQueue(){
		first = null;
		last = null;
	}
	
	public void insert(AgendaQLink key_node){
		if(isEmpty()){
			first = key_node;
			last = key_node;
		}
		else{
			key_node.next = first;
			first.previous = key_node;
			first = key_node;
		}
	}
	
	public void remove(){
		last = last.previous;
		last.next = null;
	}
	
	public boolean isEmpty(){
		return (first == null);
	}
}
